﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Framework_Tool
{
    /// <summary>
    /// Interaction logic for AssessmentDelete.xaml
    /// </summary>
    public partial class AssessmentDelete : Page
    {
        MainWindow main;

        public AssessmentDelete()
        {
            InitializeComponent();
            asmntIDCmbx_deleteAsmnt.SelectionChanged -= asmntIDCmbx_deleteAsmnt_SelectionChanged_1;
            Database.FindID_AsmntDelete(this);
            asmntIDCmbx_deleteAsmnt.SelectionChanged += asmntIDCmbx_deleteAsmnt_SelectionChanged_1;

            viewAssessmentBtn.FontWeight = FontWeights.Normal;
            addAssessmentBtn.FontWeight = FontWeights.Normal;
            updateAssessmentBtn.FontWeight = FontWeights.Normal;
            deleteAssessmentBtn.FontWeight = FontWeights.ExtraBold;
            searchAssessmentBtn.FontWeight = FontWeights.Normal;
        }

        private void viewAssessmentBtn_Click_1(object sender, RoutedEventArgs e)
        {
            AssessmentView asmntViewWindow = new AssessmentView();
            asmntViewWindow.Content = null;
            mainContent.Children.Add(asmntViewWindow.mainContent);
        }

        private void addAssessmentBtn_Click_1(object sender, RoutedEventArgs e)
        {
            AssessmentAdd addAsmntWindow = new AssessmentAdd();
            addAsmntWindow.Content = null;
            mainContent.Children.Add(addAsmntWindow.mainContent);
        }

        private void updateAssessmentBtn_Click_1(object sender, RoutedEventArgs e)
        {
            AssessmentUpdate updateAsmntWindow = new AssessmentUpdate();
            updateAsmntWindow.Content = null;
            mainContent.Children.Add(updateAsmntWindow.mainContent);
        }

        private void searchAssessmentBtn_Click_1(object sender, RoutedEventArgs e)
        {

        }

        private void asmntIDCmbx_deleteAsmnt_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
        {
            Database.populateFields_asmntDelete(this);
        }

        private void asmntIDTxt_deleteAsmnt_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
        {
            Database.populateFields_asmntDelete(this);
        }

        private void asmntDelete_Click_1(object sender, RoutedEventArgs e)
        {
            Database.DeleteAsmnt(this);
            asmntIDCmbx_deleteAsmnt.Items.Clear();
            Database.FindID_AsmntDelete(this);
        }

        private void cancelAsmntDelete_Click_1(object sender, RoutedEventArgs e)
        {
            asmntIDCmbx_deleteAsmnt.SelectedValue = null;
            asmntTitleTxt.Text = null;
            unitNameTxt_deleteAsmnt.Text = null;
            unitIDLbl_deleteAsmnt.Content = null;
            asmntTypeTxt_deleteAsmnt.Text = null;
            asmntDescTxt.Text = null;
            asmntDeletedLblGrid.Visibility = Visibility.Hidden;
        }

        // *********************************************** ESSAY ***********************************************

        // ******************************************* FILL IN THE BLANKS *******************************************

        // ********************************************* MULTIPLE CHOICE *********************************************


        private void mcCorrectAdd_deleteAsmnt_Click_1(object sender, RoutedEventArgs e)
        {

        }

        private void mcAltAdd_deleteAsmnt_Click_1(object sender, RoutedEventArgs e)
        {

        }

        private void mcCorrectDelete_deleteAsmnt_Click_1(object sender, RoutedEventArgs e)
        {

        }

        private void mcAltAnsDelete_deleteAsmnt_Click_1(object sender, RoutedEventArgs e)
        {

        }

        // *********************************************** WORDSEARCH ***********************************************

    }
}
